package com.kingyea.app.market.client;

import com.kingyea.app.market.condition.AllCondition;
import com.kingyea.app.market.dept.bean.Organization;
import com.kingyea.mobilepolice.system.Result;
import com.kingyea.mobilepolice.system.aspect.NotResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author cxc
 * @version v1.0.0
 * @description This is a class
 * @date Created in 2018.04.27 15:32
 */

@FeignClient(value = "auth-server")
public interface OrganizationServiceClient {

    @NotResult
    @PostMapping(value = "/organization/search")
    Object orgSearch(@RequestBody AllCondition condition);

    @NotResult
    @PostMapping(value = "/organization/queryByCondition")
    Object queryByCondition(@RequestBody AllCondition condition);

    @NotResult
    @PostMapping(value = "/organization/getByUserId")
    Object getByUserId(@RequestBody AllCondition condition);

    @NotResult
    @PostMapping(value = "/organization/getBySerialNo")
    Result<Organization> getBySerialNo(@RequestParam(value = "serialNo") String serialNo);

    @RequestMapping(value = "/organization/getOrgNameByRole")
    Object getOrgNameByRole();
}
